package cc.customer.quartzTask;

import cc.customer.center.SaleCusManagerServices;
import cc.customer.common.annotation.CronTag;
import cc.customer.common.service.RedisService;
import cc.customer.myCustomer.damain.CusResource;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Set;

@CronTag("SaleTask")
public class SaleTask {

    @Autowired
    private RedisService redisService;
    @Autowired
    private SaleCusManagerServices customerServices;
    /**销售管理的定时清楚缓存**/
    public  void  removeSaleData(){
        Set<String> keys = redisService.getKeys( "SaleCusManagerService*");
        keys.forEach(key -> {
            redisService.del(key);
        });
        //清空完成后 在同步新的数据
        CusResource cusResource = new CusResource();
        cusResource.setBeforeTime("7");
        cusResource.setNickname("");
        cusResource.setLabel(""); cusResource.setAfterTime("");
        cusResource.setNotLabel("");cusResource.setOtherLabel("");
        cusResource.setUserid("");
        this.customerServices.selectCusCustomerList(cusResource);
    }
    /**大资源资源**/





}
